package com.bluemoon.model.test.validation.service;

import cn.com.bluemoon.daps.common.domain.ResultBean;
import cn.com.bluemoon.daps.common.enums.DatabaseType;
import cn.com.bluemoon.daps.common.mp.IBmService;
import cn.com.bluemoon.daps.model.entity.DapDataModelRecord;
import cn.com.bluemoon.daps.model.vo.SearchModelApplicationVo;
import cn.com.bluemoon.daps.standard.dto.ApplicationModelDto;
import com.baomidou.mybatisplus.core.metadata.IPage;

public interface DapDataModelRecordService extends IBmService<DapDataModelRecord> {

    /**
     * 模型发布
     * @param modelId
     * @param databaseType
     * @return
     */
    ResultBean<Boolean> publishModel(String modelId, DatabaseType databaseType);

    /**
     * 发布列表
     * @param application
     * @return
     */
    IPage<ApplicationModelDto> getList(SearchModelApplicationVo application, Integer applicationType);

    /**
     * 单个模型申请发布
     * @param recordId
     */
    boolean singleModelApplicationRelease(String recordId, String desc);

    /**
     * 撤销
     * @param modelId
     * @param recordId
     */
    void cancelRelease(String modelId, String recordId);

    /**
     * 不通过发布
     * @param recordId
     */
    void unPass(String recordId);

    /**
     * 通过发布
     * @param recordId
     */
    void pass(String recordId, String modelId, DatabaseType databaseType);
}
